﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DP.Decorator
{
    public class BaseDecorator : BasePay //从基础功能继承
    {
        protected  BasePay _BasePay = null;
        public BaseDecorator(BasePay basepay) //将基础功能的类传入
        {
            this._BasePay = basepay;
        }

        public override void Pay()
        {
            this._BasePay.Pay(); //执行传入功能的方法；
        }
    }
}
